﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_ConsultReply 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_ConsultReply : Entity
    {
        public TB_ConsultReply() : base("TB_ConsultReply") { _ID = Guid.NewGuid().ToString(); }

        #region Model
        private string _ID;
        private string _TopicID;
        private string _RConsultTitle;
        private string _RConsultContent;
        private string _RConsultContentRTF;
        private int? _ReadCount;
        private DateTime? _CreateDate;
        private string _RConsultUsersID;
        private string _RConsultUsersNickName;
        private string _RConsultUsersIP;
        private string _State;
        private string _IsQuestions;
        private string _RConsultResorce;
        /// <summary>
        /// 主键ID
        /// </summary>
        public string ID
        {
            get { return _ID; }
            set
            {
                this.OnPropertyValueChange(_.ID, _ID, value);
                this._ID = value;
            }
        }
        /// <summary>
        /// 标题ID
        /// </summary>
        public string TopicID
        {
            get { return _TopicID; }
            set
            {
                this.OnPropertyValueChange(_.TopicID, _TopicID, value);
                this._TopicID = value;
            }
        }
        /// <summary>
        /// 回复标题
        /// </summary>
        public string RConsultTitle
        {
            get { return _RConsultTitle; }
            set
            {
                this.OnPropertyValueChange(_.RConsultTitle, _RConsultTitle, value);
                this._RConsultTitle = value;
            }
        }
        /// <summary>
        /// 回复内容
        /// </summary>
        public string RConsultContent
        {
            get { return _RConsultContent; }
            set
            {
                this.OnPropertyValueChange(_.RConsultContent, _RConsultContent, value);
                this._RConsultContent = value;
            }
        }
        /// <summary>
        /// CS端回复内容码
        /// </summary>
        public string RConsultContentRTF
        {
            get { return _RConsultContentRTF; }
            set
            {
                this.OnPropertyValueChange(_.RConsultContentRTF, _RConsultContentRTF, value);
                this._RConsultContentRTF = value;
            }
        }
        /// <summary>
        /// 阅读数
        /// </summary>
        public int? ReadCount
        {
            get { return _ReadCount; }
            set
            {
                this.OnPropertyValueChange(_.ReadCount, _ReadCount, value);
                this._ReadCount = value;
            }
        }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate
        {
            get { return _CreateDate; }
            set
            {
                this.OnPropertyValueChange(_.CreateDate, _CreateDate, value);
                this._CreateDate = value;
            }
        }
        /// <summary>
        /// 回复人ID
        /// </summary>
        public string RConsultUsersID
        {
            get { return _RConsultUsersID; }
            set
            {
                this.OnPropertyValueChange(_.RConsultUsersID, _RConsultUsersID, value);
                this._RConsultUsersID = value;
            }
        }
        /// <summary>
        /// 回复名称
        /// </summary>
        public string RConsultUsersNickName
        {
            get { return _RConsultUsersNickName; }
            set
            {
                this.OnPropertyValueChange(_.RConsultUsersNickName, _RConsultUsersNickName, value);
                this._RConsultUsersNickName = value;
            }
        }
        /// <summary>
        /// 回复人IP
        /// </summary>
        public string RConsultUsersIP
        {
            get { return _RConsultUsersIP; }
            set
            {
                this.OnPropertyValueChange(_.RConsultUsersIP, _RConsultUsersIP, value);
                this._RConsultUsersIP = value;
            }
        }
        /// <summary>
        /// 状态(撤销)
        /// </summary>
        public string State
        {
            get { return _State; }
            set
            {
                this.OnPropertyValueChange(_.State, _State, value);
                this._State = value;
            }
        }
        /// <summary>
        /// 是否回答(学生记录是问,老师是答)
        /// </summary>
        public string IsQuestions
        {
            get { return _IsQuestions; }
            set
            {
                this.OnPropertyValueChange(_.IsQuestions, _IsQuestions, value);
                this._IsQuestions = value;
            }
        }
        /// <summary>
        /// 来源(App,网站)
        /// </summary>
        public string RConsultResorce
        {
            get { return _RConsultResorce; }
            set
            {
                this.OnPropertyValueChange(_.RConsultResorce, _RConsultResorce, value);
                this._RConsultResorce = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.ID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.ID,
				_.TopicID,
				_.RConsultTitle,
				_.RConsultContent,
				_.RConsultContentRTF,
				_.ReadCount,
				_.CreateDate,
				_.RConsultUsersID,
				_.RConsultUsersNickName,
				_.RConsultUsersIP,
				_.State,
				_.IsQuestions,
				_.RConsultResorce};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._ID,
				this._TopicID,
				this._RConsultTitle,
				this._RConsultContent,
				this._RConsultContentRTF,
				this._ReadCount,
				this._CreateDate,
				this._RConsultUsersID,
				this._RConsultUsersNickName,
				this._RConsultUsersIP,
				this._State,
				this._IsQuestions,
				this._RConsultResorce};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ID = DataUtils.ConvertValue<string>(reader["ID"]);
            this._TopicID = DataUtils.ConvertValue<string>(reader["TopicID"]);
            this._RConsultTitle = DataUtils.ConvertValue<string>(reader["RConsultTitle"]);
            this._RConsultContent = DataUtils.ConvertValue<string>(reader["RConsultContent"]);
            this._RConsultContentRTF = DataUtils.ConvertValue<string>(reader["RConsultContentRTF"]);
            this._ReadCount = DataUtils.ConvertValue<int?>(reader["ReadCount"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(reader["CreateDate"]);
            this._RConsultUsersID = DataUtils.ConvertValue<string>(reader["RConsultUsersID"]);
            this._RConsultUsersNickName = DataUtils.ConvertValue<string>(reader["RConsultUsersNickName"]);
            this._RConsultUsersIP = DataUtils.ConvertValue<string>(reader["RConsultUsersIP"]);
            this._State = DataUtils.ConvertValue<string>(reader["State"]);
            this._IsQuestions = DataUtils.ConvertValue<string>(reader["IsQuestions"]);
            this._RConsultResorce = DataUtils.ConvertValue<string>(reader["RConsultResorce"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ID = DataUtils.ConvertValue<string>(row["ID"]);
            this._TopicID = DataUtils.ConvertValue<string>(row["TopicID"]);
            this._RConsultTitle = DataUtils.ConvertValue<string>(row["RConsultTitle"]);
            this._RConsultContent = DataUtils.ConvertValue<string>(row["RConsultContent"]);
            this._RConsultContentRTF = DataUtils.ConvertValue<string>(row["RConsultContentRTF"]);
            this._ReadCount = DataUtils.ConvertValue<int?>(row["ReadCount"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(row["CreateDate"]);
            this._RConsultUsersID = DataUtils.ConvertValue<string>(row["RConsultUsersID"]);
            this._RConsultUsersNickName = DataUtils.ConvertValue<string>(row["RConsultUsersNickName"]);
            this._RConsultUsersIP = DataUtils.ConvertValue<string>(row["RConsultUsersIP"]);
            this._State = DataUtils.ConvertValue<string>(row["State"]);
            this._IsQuestions = DataUtils.ConvertValue<string>(row["IsQuestions"]);
            this._RConsultResorce = DataUtils.ConvertValue<string>(row["RConsultResorce"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_ConsultReply");
            /// <summary>
            /// 主键ID
            /// </summary>
            public readonly static Field ID = new Field("ID", "TB_ConsultReply", "主键ID");
            /// <summary>
            /// 标题ID
            /// </summary>
            public readonly static Field TopicID = new Field("TopicID", "TB_ConsultReply", "标题ID");
            /// <summary>
            /// 回复标题
            /// </summary>
            public readonly static Field RConsultTitle = new Field("RConsultTitle", "TB_ConsultReply", "回复标题");
            /// <summary>
            /// 回复内容
            /// </summary>
            public readonly static Field RConsultContent = new Field("RConsultContent", "TB_ConsultReply", "回复内容");
            /// <summary>
            /// CS端回复内容码
            /// </summary>
            public readonly static Field RConsultContentRTF = new Field("RConsultContentRTF", "TB_ConsultReply", "CS端回复内容码");
            /// <summary>
            /// 阅读数
            /// </summary>
            public readonly static Field ReadCount = new Field("ReadCount", "TB_ConsultReply", "阅读数");
            /// <summary>
            /// 创建日期
            /// </summary>
            public readonly static Field CreateDate = new Field("CreateDate", "TB_ConsultReply", "创建日期");
            /// <summary>
            /// 回复人ID
            /// </summary>
            public readonly static Field RConsultUsersID = new Field("RConsultUsersID", "TB_ConsultReply", "回复人ID");
            /// <summary>
            /// 回复名称
            /// </summary>
            public readonly static Field RConsultUsersNickName = new Field("RConsultUsersNickName", "TB_ConsultReply", "回复名称");
            /// <summary>
            /// 回复人IP
            /// </summary>
            public readonly static Field RConsultUsersIP = new Field("RConsultUsersIP", "TB_ConsultReply", "回复人IP");
            /// <summary>
            /// 状态(撤销)
            /// </summary>
            public readonly static Field State = new Field("State", "TB_ConsultReply", "状态(撤销)");
            /// <summary>
            /// 是否回答(学生记录是问,老师是答)
            /// </summary>
            public readonly static Field IsQuestions = new Field("IsQuestions", "TB_ConsultReply", "是否回答(学生记录是问,老师是答)");
            /// <summary>
            /// 来源(App,网站)
            /// </summary>
            public readonly static Field RConsultResorce = new Field("RConsultResorce", "TB_ConsultReply", "来源(App,网站)");
        }
        #endregion


    }
}

